hysop.topology.cartesian_descriptor module¶
- class hysop.topology.cartesian_descriptor.CartesianTopologyDescriptor(mpi_params, domain, backend, cartesian_discretization, **kwds)[source]¶
Bases:
TopologyDescriptor
Describes how a CartesianTopology topology should be built.
Initialize a CartesianTopologyDescriptor.
Notes
kwds allows for backend specific variables. CartesianTopologyDescriptor is immutable.
- property boundaries¶
Get left and right boundaries.
- classmethod build_descriptor(backend, operator, field, handle, **kwds)[source]¶
Generate a descriptor from a lower level representation. If handle is already a Topology or a TopologyDescriptor it is returned unchanged.
If handle is a CartesianTopologyDescriptors (ie. currently a Discretization), a CartesianTopologyDescriptor is created and returned.
Every new topology type should be registered here.
- choose_topology(known_topologies, **kwds)[source]¶
Find optimal topology parameters from known_topologies. If None is returned, create_topology will be called instead.
- create_topology(cutdirs, ghosts)[source]¶
Build a topology with the current TopologyDescriptor. Free parameters are cutdir and ghosts which are imposed by operators on variables and solved during operator’s method get_field_requirements().
- property global_resolution¶
Get the global global_resolution of the discretization (logical grid_size).
- property grid_resolution¶
Get the global grid resolution of the discretization (effective grid size).
- property lboundaries¶
Get the left boundaries.
- property rboundaries¶
Get the left boundaries.
- property space_step¶
Get the space step.
- hysop.topology.cartesian_descriptor.CartesianTopologyDescriptors = (<class 'hysop.topology.cartesian_topology.CartesianTopology'>, <class 'hysop.topology.cartesian_descriptor.CartesianTopologyDescriptor'>, <class 'hysop.tools.parameters.CartesianDiscretization'>, <class 'tuple'>, <class 'list'>, <class 'numpy.ndarray'>, <class 'NoneType'>)¶
Instance of those types can be used to create a CartesianTopologyDescriptor. Thus they can be passed in the variables of each operator supporting CartesianTopology topologies.